/* IE6 flicker fix
-------------------------------------------------- */
try { document.execCommand("BackgroundImageCache", false, true); } catch(err){}
jQuery.fn.hasClass = function(c) { return this.is('.'+c) };
function g(r){ return document.getElementById(r); }

$.fn.cycle.defaults.timeout = 6000;
$(function() {
    $('#front-banner-cont .a').after('<ul id="nav" class="nav clear">').cycle({
        pager:  '#nav',
		fx:     'fade',
		speed:   600,
		timeout: 6000,
		pause:   1,
		fx:     'scrollLeft',
		cleartype:  true,
	    cleartypeNoBg:  true,
        next:    '.next',
        prev:    '.prev',
        pager:   '#nav',
        pagerAnchorBuilder: pagerFactory
    });
	function pagerFactory(idx, slide) {
        var s = idx > 2 ? ' style="display:none"' : '';
        return '<li'+s+'><a href="#"><span>'+(idx+1)+'</span></a></li>';
    };
});
